﻿/*
 * 
 * User: manju  Date: 6/25/2012
 * 
 */
using System;

namespace Examples
{
	class Program
	{
		public static void Main(string[] args)
		{
			
			//PersonExample();
			//XExample();
			EnumEx();
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
			
		}
		
		public  static void  EnumEx()
		{
			EnumExample.EnumTest();
		
			
			
		}
		
		
		public static void XExample(){
			X x1 = new X();
			int i =5;
			x1.Do(ref i);
			Console.WriteLine(i);
			
			int y = 4;
			x1.Do(y);
			Console.WriteLine(y);
			x1.Do(3);
			
			
			Address a1 = new Address();
			a1.HouseNumber = "111";
			a1.Apt = "yyy";
			
			a1.PrintDetails();
			x1.Do(ref a1);
			a1.PrintDetails();
			
		}

		public static void PersonExample(){
			
			Person c1 = createCustomer("Biju" , "Joseph" , "11111111" , "Bank of America" );
			Person c2 = createCustomer("Manju" , "Paul", "6587999008" , "Discover");
			
			c1.PrintDetails();
			c2.PrintDetails();

		}

		public static Person createCustomer(string fn, string ln, string cardNumber, String cardBank){
			
			Person customer1 = new Person();
			customer1.FirstName = fn;
			customer1.LastName = ln;
			
			Address customer1BillingAddress = new Address();
			customer1BillingAddress.HouseNumber = "13815";
			customer1BillingAddress.Street = "Jefferson Park Dr";
			customer1BillingAddress.Apt = "4109";
			customer1BillingAddress.City = "Herndon";
			customer1BillingAddress.State = "VA";
			customer1BillingAddress.Country = "USA";
			customer1BillingAddress.Zip = 20171;
			
			customer1.BillingAddress = customer1BillingAddress;
			customer1.ShippingAddress = customer1BillingAddress;
			
			CreditCard c1 = new CreditCard();
			c1.Bank = cardBank;
			c1.Number = cardNumber;
			c1.Owner= fn + " " + ln;
			c1.ExpiryMonth = 12;
			c1.ExpiryYear = 2013;
			
			customer1.CreditCards.Add(c1);
			
			return customer1;
		}
	}
}